﻿using System;
using System.Windows.Input;

namespace VideoReflector.Controllers
{
    /// <summary>
    /// Interface for controller responsible for providing tag creation functionality
    /// </summary>
    public interface ITagController
    {
        /// <summary>
        /// Add a clip tag with an explictly provided timestamp to the tag controllers
        /// clip tag collection. Provided as a public method in additio to AddTagCommand
        /// to allow later addition of tags after recording
        /// </summary>
        /// <param name="tagTime"> Timestamp to generate tag with </param>
        /// <param name="group"> ID of tag group to add tag to </param>
        void AddTag(int tagTime, int group);

        /// <summary>
        /// Command to add a tag to the controllers collection, requiring a integer tag group ID as a CommandParameter
        /// </summary>
        ICommand AddTagCommand { get; }

        /// <summary>
        /// Time elapsed in seconds since Start() call
        /// </summary>
        int ElapsedTime { get; }

        /// <summary>
        /// Whether controller currently has an active timer and addition of tags via AddTagCommand is possible
        /// </summary>
        bool Enabled { get; }

        /// <summary>
        /// Start tag timer and enabling creation of tags via command
        /// </summary>
        void Start();

        /// <summary>
        /// Stop tag timer and disable further tag creation via command
        /// </summary>
        void Stop();
    }
}
